package com.sskj.api.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@Schema(description = "项目成员表")
@TableName("project_member")
public class ProjectMember {

    @Schema(description = "主键ID")
    private Long id;

    @TableField("project_id")
    @Schema(description = "项目ID")
    private Long projectId;

    @Schema(description = "项目名称")
    @TableField(exist = false)
    private String projectName;

    @Schema(description = "用户ID")
    @TableField("user_id")
    private Long userId;

    @Schema(description = "用户名称")
    @TableField(exist = false)
    private String username;

    @Schema(description = "角色类型[1:admin|2:rw|3:r]")
    @TableField("role_type")
    private Integer roleType;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    private LocalDateTime updateTime;
}
